package org.base.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author He mingliang
 * @date 2020/7/20
 */
public class OrderUtils {

    public static String orderSn() {
        final Date now = new Date();
        String date = new SimpleDateFormat("yyyyMMdd").format(now);
        String seconds = new SimpleDateFormat("HHmmss").format(now);
        return date + "0" + RandomUtils.generateInt(3) + "0" + seconds + RandomUtils.generateInt(3);
    }

    public static void main(String[] args) {
        for (int i = 0; i < 1000; i++) {
            System.out.println(orderSn());
        }
    }
}
